<script>
import {defineComponent} from 'vue'

export default defineComponent({
    name: "keyBoard",
    data() {
        return {
            text: '复制文字',
        }
    },
    methods: {
        keyUp() {
            console.log('11')
        },
        keyUp1(e) {
            console.log(e)
        },
        jump () {
            window.location.href = 'https://www.baidu.com'
        },
        copy (e) {
            console.log(e)
        }
    }
})
</script>

<template>
  <div>
      <label for="">key</label>
      <input type="text" @keyup="keyUp">
<!--      键盘修饰符(可以绑定多个值) @keyup.65、@keyup.a 当输入a时才会触发该事件 -->
      <input type="text" @keyup.65="keyUp1">
      <input type="text" @keyup.enter="jump">
      <p>{{text}}</p>
      <input type="text" @keyup.17="copy">
<!--      <input type="text" @keyup="copy">-->
  </div>
</template>

<style scoped lang="less">

</style>